package com.laowang.project.system.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.laowang.framework.aspectj.lang.annotation.Excel;
import com.laowang.framework.web.domain.PageObject;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 用户金币变动记录对象 user_gold_log
 *
 * @author laowang
 * @date 2023-06-07
 */
@NoArgsConstructor
@Data
public class UserGoldLog extends PageObject implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * $column.columnComment
     */
    @ApiModelProperty(value = "${comment}", required = false)
    private Integer id;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    @ApiModelProperty(value = "用户id", required = false)
    private Integer userId;

    @Excel(name = "昵称")
    @Transient
    private String nickname;



    /**
     * 旧金额
     */
    @Excel(name = "旧金额")
    @ApiModelProperty(value = "旧金额", required = false)
    private BigDecimal oldBalance;

    /**
     * 变动金额
     */
    @Excel(name = "变动金额")
    @ApiModelProperty(value = "变动金额", required = false)
    private BigDecimal changeBalance;

    /**
     * 当前金额
     */
    @Excel(name = "当前金额")
    @ApiModelProperty(value = "当前金额", required = false)
    private BigDecimal newBalance;

    /**
     * 变动类型，1提现，2任务,3充值，4购买会员等
     */
    @Excel(name = "变动类型" ,readConverterExp ="1=提现,2=活动佣金,3=充值,4=购买会员,5=商家入驻佣金,6=购买副牌佣金,7=兑换商城商品,8=金币兑换积分,9=购买团购商品佣金,11=分享购买推荐官佣金,12=分享购买购买合伙人佣金,13=推荐官团队奖励,14=合伙人团队奖励,15=股东团队奖励" )
    @ApiModelProperty(value = "1提现，2活动佣金,3充值，4购买会员佣金,4商家入驻佣金", required = false)
    private Integer type;

    @Excel(name = "金币状态",readConverterExp = "1=可提现,2=冻结中,3=活动退款金币已充公")
    private Integer status;//'1可提现,2冻结中,3退款金币已返回',

    private Integer signId;//'1可提现,2冻结中,3退款金币已返回',

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间", required = false)
    private Date created;

    /**
     * 任务id
     */
    //@Excel(name = "任务id")
    @ApiModelProperty(value = "任务id", required = false)
    private String fromSourceId;

    private String remark;


    private String activityName;

    @Transient
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activityEndTime;



    @Transient
    private Integer isAuth;

    //beginTime=2023-12-01+10:01:02&endTime=2023-12-12+02:02:08
    @Transient
    private String beginTime;

    @Transient
    private String endTime;
}
